<template>
  <div class="home" ref="homeRef" @touchstart="handleTouchStart" @touchend="handleTouchEnd">
    <div class="tcy">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/tcy.png" alt="">
    </div>
    <div class="tlp">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/tly.png" alt="">
    </div>
    <div class="try">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/try.png" alt="">
    </div>
    <div class="neirong">
      <div class="xx">
        <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/xx.png" alt="">
      </div>
    </div>
    <div class="haibao">
      <img class="homeImg" src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image3/haibaoren.png" alt="">
      <img class="xfy" src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/xfy.png" alt="">
    </div>
    <div class="xft">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/ft1.png" alt="">
    </div>
    <div class="logo">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image3/kxxxl.png" alt="">
    </div>
    <div class="btn" @click="toPaly">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image3/ksyx.png">
    </div>
    <div class="bly">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/bly.png" alt="">
    </div>
    <div class="bry">
      <img src="https://vivo.zhongwangyingtong.com/vivoimage/assets/image/bry.png" alt="">
    </div>
  </div>
</template>

<script setup lang="ts">
import {onMounted, reactive, ref} from 'vue';
import {Session} from '../../utils/storage'
import { homeCartoon } from './cartoon'
import { useRouter } from 'vue-router'
const router = useRouter()
const homeRef = ref();
const { handleTouchStart,handleTouchEnd } = homeCartoon(homeRef)
const state = reactive({
  hds:false,
  userVerifyShow:false,
  dataVerify:false,
  swks:true,
  sfxz:'0'
})

const toBoxFun = () => {
  state.userVerifyShow = true
  if(!Session.get('token')){
    state.userVerifyShow = true
  }
}
const toPaly = () => {
  debugger
  router.push({
    path:'/play'
  })
}
onMounted(() => {
  setTimeout(() => {
    state.hds = true;
  }, 8500);
});
</script>

<style lang="scss" scoped>
.userVerify{
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  .popupBox{
    box-sizing: border-box;
    padding: 30px 20px;
    width: 80%;
    height: 300px;
    position: relative;
    background: url("https://vivo.zhongwangyingtong.com/vivoimage/assets/image2/xaunzeshenfen.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    .dyBox{
      position: absolute;
      bottom: 0;
      width: 100%;
    }
    .xiangji{
      position: absolute;
      right: -30px;
      top: 50px;
      width: 80px;
    }
    .yfBox{
      position: absolute;
      left: -20px;
      bottom: -40px;
      width: 60px;
    }
    .schb{
      width: 80%;
      margin: 0 auto;
    }
    .selectBox{
      width: 80%;
      height: 50px;
      margin: 0 auto;
      position: relative;
      //overflow: hidden;
      .selectBoxAc{
        position: absolute;
        top: -5px;
        left: 0;
      }
    }
    .selectBox:nth-child(1){
      margin-top:20px;
    }
    .nameBox,.sjBox{
      //position: absolute;
      margin-top: 8px;
      width: 80%;
      height: 40px;
      z-index: 99;
      background: url("https://vivo.zhongwangyingtong.com/vivoimage/assets/image/xmsr.png");
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
      display: flex;
      align-items: center;
      :deep(.el-input__wrapper){
        border-radius: 50px !important;
        border: 1px solid black;
      }
      :deep(.el-input__inner){
        font-size: 18px;
        //text-align: center;
      }
      :deep(.el-input){
        width: 100%;
        height: 40px;
        border-radius: 40px !important;

      }
    }
  }
}



img {
  width: 100%;
}

.text{
  width: 100%;
  position: absolute;
  top: 40%;
  font-size: 18px;
  color: white;
  .text1,.text2,.text3,.text4{
    opacity: 0;
    //font-family: vivoSxgn;
  }
}
.haibao{
  position: absolute;
  display: none;
  width: 100%;
  bottom: 0;
  .homeImg{
    position: absolute;
    width: 100%;
    left: 0;
    bottom:-392px;
    display: none;
  }
  .xfy{
    width: 80%;
    position: absolute;
    left: 0;
    bottom: -150px;
  }
}
.xft{
  width: 70%;
  position: absolute;
  z-index: 9999;
  left: 35%;
  top: -130px;
}
.logo{
  position: absolute;
  width: 100%;
  display: flex;
  top: 190px;
  justify-content: center;
  opacity:0;
  img{
    width: 90%;
  }
}
.btn{
  position: absolute;
  width: 100%;
  display: flex;
  bottom: 70px;
  justify-content: center;
  opacity:0;
  z-index: 99;
  img{
    width: 50%;
  }
}
.home {
  width: 100%;
  height: 100%;
  background: url("https://vivo.zhongwangyingtong.com/vivoimage/assets/image/bc.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  .tlp {
    position: absolute;
    width: 80%;
    top: 0;
    left: 0;
  }

  .tcy {
    position: absolute;
    width: 65%;
    top: 15px;
    left: 28%;
  }

  .try {
    position: absolute;
    width: 50%;
    top: 0;
    right: 0;
    z-index: 1;
  }

  .ft {
    position: absolute;
    width: 80%;
    left: -40px;
  }

  .xx {
    width: 50%;
    position: absolute;
    top: 13%;
    left: 20%;
  }

  .yf {
    width: 17%;
    position: absolute;
    top: -100px;
    left: 11%;
  }

  .hlh{
    width: 12%;
    position: absolute;
    top: -100px;
    right: 20%;
  }

  .llh{
    width: 17%;
    position: absolute;
    top: -100px;
    right: 0;
  }

  .dlh{
    position: absolute;
    width: 150px;
    height: 150px;
    top: -150px;
    left: 4%;
    z-index: 5;
    .bg{
      width: 120%;
      display: none;
      position: absolute;
      top: -155px;
      left: 36px;
    }
    .dlhd{
      position: absolute;
      left: 15px;
      top: -10px;
      transform: rotate(15deg);
      z-index: 6;
    }
    .lcd{
      //z-index: 9;
      display: none;
      position: absolute;
      left: 100px;
      top: -80px;
    }
  }

  .hzl{
    //width: 200px;
    display: none;
    .yb1{
      position: absolute;
      width: 10px;
      bottom: 190px;
      left: 26%;
      z-index: 10;
    }
    .yb2{
      position: absolute;
      width: 15px;
      bottom: 190px;
      left: 26%;
      z-index: 10;
    }
    .yb3{
      position: absolute;
      width: 15px;
      bottom: 190px;
      left: 26%;
      z-index: 10;
    }
    .hg{
      position: absolute;
      width: 15px;
      bottom: 190px;
      left: 26%;
      z-index: 10;
    }
    .hz{
      position: absolute;
      width: 15px;
      bottom: 190px;
      left: 26%;
      z-index: 10;
    }
  }

  .cd{
    //position: absolute;
    display: none;
    .xhcd{
      width: 30px;
      position: absolute;
      bottom: 107px;
      right: 30px;
      z-index: 90;
    }
    .dhcd{
      width: 160px;
      position: absolute;
      bottom: 36px;
      right: 24px;
      z-index: 90;
    }
  }

  .bly {
    position: absolute;
    width: 95%;
    bottom: -10px;
    z-index: 1;
  }

  .bry {
    position: absolute;
    width: 100%;
    right: 0;
    bottom: -10px;
    z-index: 50;
  }
}
</style>
